home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-MIPS / KEYBOARD.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  3KB  |  101 lines

  1. /*
  2.  * CPU specific parts of the keyboard driver
  3.  *
  4.  * This file is subject to the terms and conditions of the GNU General Public
  5.  * License.  See the file "COPYING" in the main directory of this archive
  6.  * for more details.
  7.  *
  8.  * $Id: keyboard.h,v 1.12 1998/09/16 22:52:41 ralf Exp $
  9.  */
  10. #ifndef __ASM_MIPS_KEYBOARD_H
  11. #define __ASM_MIPS_KEYBOARD_H
  12.  
  13. #ifdef __KERNEL__
  14.  
  15. #include <linux/config.h>
  16. #include <linux/delay.h>
  17. #include <linux/ioport.h>
  18. #include <asm/bootinfo.h>
  19.  
  20. extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode);
  21. extern int pckbd_getkeycode(unsigned int scancode);
  22. extern int pckbd_pretranslate(unsigned char scancode, char raw_mode);
  23. extern int pckbd_translate(unsigned char scancode, unsigned char *keycode,
  24.                char raw_mode);
  25. extern char pckbd_unexpected_up(unsigned char keycode);
  26. extern void pckbd_leds(unsigned char leds);
  27. extern void pckbd_init_hw(void);
  28. extern unsigned char pckbd_sysrq_xlate[128];
  29.  
  30. #define kbd_setkeycode        pckbd_setkeycode
  31. #define kbd_getkeycode        pckbd_getkeycode
  32. #define kbd_pretranslate    pckbd_pretranslate
  33. #define kbd_translate        pckbd_translate
  34. #define kbd_unexpected_up    pckbd_unexpected_up
  35. #define kbd_leds        pckbd_leds
  36. #define kbd_init_hw        pckbd_init_hw
  37. #define kbd_sysrq_xlate         pckbd_sysrq_xlate
  38.  
  39. #define SYSRQ_KEY 0x54
  40.  
  41. /* Some stoneage hardware needs delays after some operations.  */
  42. #define kbd_pause() do { } while(0)
  43.  
  44. /* Pointers to keyboard hardware access and init functions.  */
  45. unsigned char (*kbd_read_input)(void);
  46. void (*kbd_write_output)(unsigned char val);
  47. void (*kbd_write_command)(unsigned char val);
  48. unsigned char (*kbd_read_status)(void);
  49.  
  50. void (*keyboard_setup)(void);
  51.  
  52. #ifdef CONFIG_MIPS_JAZZ
  53.  
  54. extern int jazz_ps2_request_irq(void);
  55. extern void jazz_ps2_free_irq(void);
  56.  
  57. #define ps2_request_irq()      jazz_ps2_request_irq()
  58. #define ps2_free_irq(inode)    jazz_ps2_free_irq()
  59.  
  60. #endif /* CONFIG_MIPS_JAZZ */
  61.  
  62. #ifdef CONFIG_SGI
  63.  
  64. #define DISABLE_KBD_DURING_INTERRUPTS 1
  65.  
  66. /*
  67.  * Machine specific bits for the PS/2 driver.
  68.  * Aux device and keyboard share the interrupt on the Indy.
  69.  */
  70. #define ps2_request_irq() 0
  71. #define ps2_free_irq(void) do { } while(0);
  72.  
  73. #endif /* CONFIG_SGI */
  74.  
  75. #if defined(CONFIG_ACER_PICA_61) || defined(CONFIG_SNI_RM200_PCI)
  76. #define CONF_KEYBOARD_USES_IO_PORTS
  77. #endif
  78.  
  79. #ifdef CONF_KEYBOARD_USES_IO_PORTS
  80. /*
  81.  * Most other MIPS machines access the keyboard controller via
  82.  * memory mapped I/O ports.
  83.  */
  84. #include <asm/io.h>
  85.  
  86. /*
  87.  * Machine specific bits for the PS/2 driver
  88.  */
  89.  
  90. #define AUX_IRQ 12
  91.  
  92. #define ps2_request_irq()                        \
  93.     request_irq(AUX_IRQ, aux_interrupt, 0, "PS/2 Mouse", NULL)
  94.  
  95. #define ps2_free_irq(inode) free_irq(AUX_IRQ, NULL)
  96.  
  97. #endif /* CONF_KEYBOARD_USES_IO_PORTS */
  98.  
  99. #endif /* __KERNEL */
  100. #endif /* __ASM_MIPS_KEYBOARD_H */
  101.